<?php


namespace app\validate;


use think\Validate as TValidate;

class User extends TValidate
{

    protected $rule = [
        'login_name' => 'require|alphaNum',
        'password'  => 'require',
        'company_name'  => 'require',
        'industry'  => 'require',
        'address'  => 'require',
        'main_product'  => 'require',
    ];

    protected $message = [
        'login_name.require'  => '请输入账号',
        'login_name.alphaNum' => '账号只能是数字和字母',
        'password.require'   => '请输入密码',
        'company_name'   => '请输入公司名',
        'industry'   => '请输入行业',
        'address'   => '请输入地址',
        'main_product'   => '请输入主营产品',
    ];
    protected $scene = [
        'login'    => ['user_name', 'password'],
        'register' => ['login_name', 'password','company_name','industry','address'],
        'addocruser'=>['count']
    ];



}